package cn.stylefeng.guns.modular.basic.mapper;

import java.util.List;
import java.util.Map;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import cn.stylefeng.guns.modular.basic.entity.BasicWarehouse;
import cn.stylefeng.guns.modular.basic.model.params.BasicWarehouseParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicWarehouseResult;

/**
 * 仓库表（原系统：库房表） Mapper 接口
 */
public interface BasicWarehouseMapper extends BaseMapper<BasicWarehouse> {

    /**
     * 获取列表
     */
    List<BasicWarehouseResult> customList(@Param("paramCondition") BasicWarehouseParam paramCondition);

    /**
     * 获取map列表
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") BasicWarehouseParam paramCondition);

    /**
     * 获取分页实体列表
     */
    Page<BasicWarehouseResult> customPageList(@Param("page") Page page, @Param("paramCondition") BasicWarehouseParam paramCondition
    		, @Param("condition") String condition, @Param("deptId") Long deptId, @Param("operateId")Long operateId);
    
    List<BasicWarehouseResult> findStoragelistPageBySpec(@Param("paramCondition") BasicWarehouseParam paramCondition
    		, @Param("condition") String condition, @Param("deptId") Long deptId);

    /**
     * 获取分页map列表
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") BasicWarehouseParam paramCondition);

	List<BasicWarehouse> listByDeptId(@Param("deptId") Long deptId);

	List<BasicWarehouseResult> findListBySpec(@Param("paramCondition")BasicWarehouseParam param, @Param("deptId")Long deptId, @Param("operateId")Long operateId);

	BasicWarehouseResult findBySpec(@Param("paramCondition")BasicWarehouseParam param,@Param("deptId")Long deptId,@Param("operateId")Long operateId);

    List<Map<String, String>> getRecommendWarehouselist(@Param("warehouseId") Long warehouseId, @Param("goodsNumber") String goodsNumber);

    Page<BasicWarehouseResult> getWarehouseByStoreId(@Param("page") Page page, @Param("storeId") String storeId, @Param("deptId") Long deptId, @Param("operateId") Long operateId);
}
